package com.wyh.mapper.gfivemapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.wyh.domain.dto.gfive.InvoicerecordsNoDTO;
import com.wyh.domain.dto.gfive.InvoicerecordsPartDTO;
import com.wyh.domain.po.gfive.Invoicerecords;
import com.wyh.domain.vo.gfive.*;
import org.apache.ibatis.annotations.Param;


import java.util.List;

public interface InvoicerecordsDTOMapper extends BaseMapper<Invoicerecords> {
    /**
     * 通过 页面数据进行查询
     */
    List<Invoicerecords> selectData(@Param("invoicerecordsSelectVO") InvoicereordsSelectVo invoicerecordsSelectVO,
                                    @Param("TypeNum")Integer TypeNum,
                                    @Param("Owner")Integer Owner,
                                    @Param("Buyer") Integer Buyer);

    /**
     * 根据 票据类型的id号查询 票据的信息
     */
    Integer selectInvByname(@Param("Type")String Type);

    /**
     * 查询 业主
     */
    Integer selectOwner(@Param("name")String name);

    /**
     * 查询业主方
     */
    Integer selectByuer(@Param("buyer")String buyer);

    /**
     * 通过 billid查询需要数据
     */
    InvoicerecordsPartDTO slectPart(@Param("billid")Integer billid);

    /**
     * 回滚金额
     */
    int UpdateMoey(@Param("money") Double money,@Param("billid")Integer billid);

    /**
     * 查询账单的应交的金额
     */
    Double selecAmount(Integer id);
    /**
     *
     */
    Invoicerecords selectByInvoicecode(@Param("Invoicerecordes") String Invoicerecords);

    /**
     * 分页显示 待处理的票据
     */
    List<InvoicerecordsNoVO> showInvoNoPage(@Param("pageNum")Integer pageNum, @Param("pageSize")Integer pageSize);


    /**
     *查询 业主的id值
     */
    List<Integer> selectOwners(@Param("owner") String owner);

    /**
     * 查询 未处理的 票据信息
     */
    List<InvoicerecordsNoDTO> selecAllNoInvo(@Param("type") Integer type, @Param("InvoSelectNoVO") InvoicerecordsSelectNoVo InvoSelectNoVO);

    /**
     * 查询应付金额
     */
    double selectAllMoney(@Param("id") Integer id);

    /**
     *  查询返回发票的 顶部数据
     */
    List<InvoicerecordsIOtherDate> selectOtherAll(@Param("noticenumber")String noticenumber);
}
